package com.quanjiaolian.order.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.quanjiaolian.tools.TimeTask;

@SuppressWarnings("serial")
public class RunTaskAction extends HttpServlet {

	/**
	 * 启动定时轮询任务
	 */
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		TimeTask.start();
		request.setAttribute("msg","定时任务启动成功!");
		request.getRequestDispatcher("index.jsp").forward(request, response);
	}

	
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		this.doGet(request, response);
	}

}
